package com.swlz.service;

import java.util.List;

import com.swlz.dto.OrderSearch;
import com.swlz.entity.MallOrder;
import com.swlz.entity.MallType;
import com.swlz.exception.CodeException;
import com.swlz.vo.OrderVO;
import com.swlz.vo.PageVO;

/**
 * <pre>
 * 业务逻辑接口
 * 商城订单
 * ClassName : com.swlz.service.MallOrderService
 * Author : swlz
 * E-Mail : 2233875735@qq.com
 * Date : 2020-06-29 00:44:36
 * Version : 1.0
 * Copyright 2020 swlz.top Inc. All rights reserved. 
 * Warning: this content is only for internal circulation of the company. It is forbidden to divulge it or use it for other commercial purposes
 * </pre>
 **/
public interface MallOrderService {


	/**
	 * 添加一个新的商城订单
	 * @param mallOrder
	 * @return
	 * @throws CodeException 500:添加商城订单错误
	 */
	int add(MallOrder mallOrder)throws CodeException;
	
	/**
	 * 根据订单编号修改商城订单
	 * @param mallOrder
	 * @return
	 * @throws CodeException 501:修改商城订单错误
	 */
	int update(MallOrder mallOrder)throws CodeException;
	
	
	/**
	 * 根据订单编号删除商城订单
	 * @param orderId - 订单编号
	 * @return
	 * @throws CodeException 502:删除商城订单错误
	 */
	int delete(Long orderId)throws CodeException;
	
	/**
	 * 根据订单编号获取商城订单对象
	 * @param orderId - 订单编号
	 * @return
	 * @throws CodeException 503:获取商城订单失败
	 */
	MallOrder get(Long orderId)throws CodeException;
	
	/**
	 * 根据模型查找匹配的数据，并进行分页
	 * @param mallOrder - 匹配数据模型
	 * @param current - 当前页面
	 * @param rowMax - 每页最大值
	 * @return - 分页结果
	 * @throws CodeException 504:获取商城订单分页数据失败
	 */
	PageVO<MallOrder> page(MallOrder mallOrder,Integer current,Integer rowMax)throws CodeException;

	PageVO<OrderVO> pages(OrderSearch ordersearch);
	
	List<MallOrder> list();
 
	/**
	 * 根据模型查找匹配的数据
	 * @param mallOrder - 匹配数据模型
	 * @param len
	 * @return
	 * @throws CodeException 505:获取商城订单列表数据失败
	 */
	List<MallOrder> list(MallOrder mallOrder,int len);
 
	void confirmPay(String out_trade_no,String trade_no,String total_amount );
}
